<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Reference extends CI_Controller {

	public function index() { }

	public function getReference($id) {
		$this->load->model('Model_reference');
		$cursor = $this->Model_reference->getReference($id);
		echo json_encode($cursor);
	}

	public function getPlaces() {
		$this->load->model('Model_reference');
		$cursor = $this->Model_reference->getPlaces();
		echo json_encode(iterator_to_array($cursor));
	}

	public function getPersons() {
		$this->load->model('Model_reference');
		$cursor = $this->Model_reference->getPersons();
		echo json_encode(iterator_to_array($cursor));
	}
}

?>